/**
 * @class   wosh::services::ManBundle
 * @brief   
 *

 generare help dei metodi, proprieta e info in man.xml
 vari formati di uscita.



 * XSL Transformations, based on libxslt1.
 * Required Libraries (and headers):
 *           - apt-get install libxslt1-dev libxml
 * [ -lxslt ]
 *
 *
 * @ingroup Services
 ****************************************************************************
 * @version $Id: ManBundle.h 2282 2010-04-07 06:20:24Z alex $
 * @author  Alessandro Polo
 ****************************************************************************/
/* Copyright (c) 2007-2010, WOSH - Wide Open Smart Home 
 * by Alessandro Polo - OpenSmartHome.com
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the OpenSmartHome.com WOSH nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY Alessandro Polo ''AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL Alessandro Polo BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ****************************************************************************/

#ifndef __WOSH_Bundles_Services_Man_H__
 #define __WOSH_Bundles_Services_Man_H__

 #include <core/BundleGeneric.h>
 #include <core/Thread.h>

 #include <interfaces/Service.h>
 #include <interfaces/services/Man.h>

class ManImpl;

namespace wosh {
 namespace services {

 #define _Man_VERSION				0.02


class ManBundle :	public BundleGeneric,
					public virtual wosh::interfaces::services::Man
 {
	WOSH_BUNDLE(wosh::services::ManBundle)
	WOSH_BUNDLE_INTERFACE("wosh::interfaces::services::Man")
	WOSH_BUNDLE_SINGLETON(1,0)

	public:
		/**
		 * @brief   Empty constructor, init bundle and vars, Properties and Methods.
		 */
		ManBundle();
		/**
		 * @brief   Empty destructor, may (synch) stop bundle and internal threads when still running
		 */
		virtual ~ManBundle();


	public:
		WRESULT bundleStart();
		WRESULT bundleStop();

		void busMessage( const Message& message, const Bus* source );


/** @name Man Interface
 * @{
 ******************************************************************************/
	public:

//@}
/** @name Getters
 * @{
 ******************************************************************************/
	public:

//@}
/** @name Setters
 * @{
 ******************************************************************************/
	public:

//@}
/** @name Internal methods
 * @{
 ******************************************************************************/

//@}
	private:
		Response* mmDoMan( const Message* requestMessage );
		Response* mmDoReGenerateCache( const Request* request );
		Response* mmDoFlushCache( const Request* request );

	protected:
		ManImpl* manWorker;	///< real implementation


}; // class def

 }; // namespace services
}; // namespace wosh

#endif //__WOSH_Bundles_Services_Man_H__
